package com.junko.dao.back;

import com.junko.core.base.BaseDao;
import com.junko.model.back.Role;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public class RoleDao extends BaseDao<Role> {

    public List<Role> findByRoleIds(String[] roleIds) {
        return getSqlSession().selectList(this.getNameSpace() + ".findByRoleIds", roleIds);
    }

    public List<Role> findNoChecked(String[] roleIds) {
        return getSqlSession().selectList(this.getNameSpace() + ".findNoChecked", roleIds);
    }

    public List<Role> findChecked(String[] roleIds) {
        return getSqlSession().selectList(this.getNameSpace() + ".findChecked", roleIds);
    }

    public List<Role> findAllNoChecked() {
        return getSqlSession().selectList(this.getNameSpace() + ".findAllNoChecked");
    }
}